Aesthetics (encodings)

PH345: Winter 2026

Philip Boonstra

Farbtafel, Paul Klee (1930)

Which color appears most often?

https://www.demilked.com/tidying-up-art-ursus-wehrli/

Tidied up Farbtafel, Ursus Wehrli (2003)

Which color appears most often?

https://www.demilked.com/tidying-up-art-ursus-wehrli/

Mapping data to aesthetics

Aesthetics or encodings are ways that we map data to visual properties of the plot and include position, color, length, shape, area, volume

Choice of aesthetics helps or hinders your audience’s understanding of what the data are showing

Case study: Five proportions

One proportion for each of five groups (A-E)

Guess group B’s numerical value as a proportion, e.g. 0.98.

Your answer would probably be close to 0.28

For each of the next 8 plots, guess group B’s numerical value based on the plot. Enter your guesses on this google form:

https://tinyurl.com/ph345aesthetics

Plot 1: Sorted Pie Chart

Plot 2: Unsorted Pie Chart

Plot 3: Filled Bar Chart

Plot 4: Bar Chart

Plot 5: Unsorted scatterplot

Plot 6: Sorted scatterplot

Plot 7: Colors

Plot 8: Area

True values of B

Perceived difficulty

Plot Easiest Most Difficult
Plot 1: Sorted Pie Chart 0 0
Plot 2: Unsorted Pie Chart 0 0
Plot 3: Filled Bar Chart 0 0
Plot 4: Bar Chart 0 0
Plot 5: Unsorted Scatterplot 0 0
Plot 6: Sorted Scatterplot 0 0
Plot 7: Colors 0 0
Plot 8: Area 0 0

Truth minus Guess (Bias)

Relative order of accuracy

Take away: some aesthetics communicate data better than others

Figure 14 from Mackinlay (1986)

Bang Wong

Vertex Fellow, Data Visualization at Vertex Pharmaceuticals.

Formerly Creative Director of the Broad Institute of MIT and adjunct assistant professor in the Department of Art as Applied to Medicine at Hopkins

Published monthly column on data visualization in Nature Methods journal from 2010-2012

Example 1

Different visual variables encoding the same five values.

Figure 1c from Wong (2010a)

Example 2

What is the rate of change of atmospheric CO2 over time?

Figure 6 from Cleveland and McGill (1985)

Example 3

What is the relative size of big vs small circle?

14x

How does distance between lines vary?

it’s constant

Figure 1c from Wong (2010a)

Types of data

  • Quantitative: numbers that measure units, e.g. years, kg, etc. Differences between numbers have meaning
  • Ordinal: numbers or categories that have natural order, e.g. Likert scales, tumor stage. Distances between numbers do not have consistent meaning (‘Almost always’ - ‘Sometimes’ = ?)
  • Nominal: Categories that have no inherent order, e.g. US states

Aesthetics for different types of data

Figure 15 from Mackinlay (1986)

Point out the swap between Quant and Ord in (length, angle, slope, area, volume) and (density, color saturation, color hue, texture, connection, containment), and then (hue, texture, connection, and containment) further improve between ord and nom.

Example 4

Lines in graphs create clear connection. Enclosure is an effective way to draw attention to a group of objects.

Figure 2b from Wong (2010b)

Example of shape as grouping for nominal data, but connection (on the rhs) provides even better grouping. but enclosure can counteract this connection, if needed

Example 5

What regions of the US experienced greatest population growth?

Figure 4.2, Wilke (2019)

Key point is that color is much more effective when used to group observations rather than for numbers

Example 6

How do Malawi’s teachers positive teaching practices compare to those of other Sub-Saharan African countries?

Figure 3.2, Asim (2024)

Another example of effective use of color – here a distinctive color is used to frame the country we are interested in, Malawi, and the other countries are also colored according to a blue scheme. On the other hand, it’s tempting but wrong to draw meaning about the different shades of blue.

Example 7

How do entrance and pass rates for Primary School Leaving Certificate Examinations (PSLCE) compare between boys and girls in Malawi?

Figure 5.2, Asim (2024)

Example 7

How do entrance and pass rates for Primary School Leaving Certificate Examinations (PSLCE) compare between boys and girls in Malawi?

Figure 5.2, Asim (2024)

Example 7

Ultimately, girls are 6 percent less likely than boys to enter the Primary School Leaving Certificate Examinations (PSLCE) and 13 percent less likely than boys to pass (refer to figure 5.2, panel b).

The 13% statistic requires comparing the relative height of the striped bar for boys against the relative height of the striped bar for girls, which is challenging without the annotated values.

Example 8

Toward Safer and More Productive Migration for South Asia

Number of deployments is calculated as average for Bangladeshi, Indian, Nepali, Pakistani, and Sri Lankan labor migrants in their respective top five destination countries… remittances are defined as total amount of remittances that flow into Bangladesh, India, Nepal, and Pakistan.

Figure 3.4, Ahmed (2022)

Example 8

Questions:

  1. When was the amount of remittances into sending countries at its highest?
  2. For every 100 deploying migrants in 2006, how many deployed in 2015?
  3. How long did it take to recover to 2006 levels in terms of deploying migrants?

Phil’s Recreation of Figure 3.4

Plotting lines emphasizes change between points: the change in the annual growth rate. How easy is this to interpret?

Drop the lines

Removing the lines makes the differences less dramatic (probably a good thing)

Change from 2006

Code Together Task

No Spice: Make an approximate version of my recreation of Figure 3.4 on slide 34: focus just on the structure

Weak Sauce: No menu options today…

Medium Spice: Make an approximate version of my ‘% Change from 2006’ plot on slide 36: focus just on the structure

Yoga Flame: Make an exact replicate of my recreation of Figure 3.4 on slide 34. I’m looking for perfection!

Dim Mak: Make an exact replicate of my ‘% Change from 2006’ plot on slide 36. I’m looking for perfection!

References

Ahmed, S.A. and Bossavie, L. eds., 2022. Toward Safer and More Productive Migration for South Asia. World Bank Publications. website

Asim, S. and Gera, R.C., 2024. What Matters for Learning in Malawi? Evidence from the Malawi Longitudinal School Survey. World Bank Publications-Books. website

Cleveland, W.S. and McGill, R., 1985. Graphical perception and graphical methods for analyzing scientific data. Science, 229(4716), pp.828-833.

Mackinlay, J., 1986. Automating the design of graphical presentations of relational information. Acm Transactions On Graphics (Tog), 5(2), pp.110-141.

Wehrli, U., 2003. Tidying Up Art. Prestel Publishing.

Wilke, C.O., 2019. Fundamentals of data visualization: a primer on making informative and compelling figures. O’Reilly Media.

Wong, B., 2010a. Design of data figures. Nature Methods, 7(9), pp.665-666.

Wong, B., 2010b. Points of view: Gestalt principles (Part 1). Nature Methods, 7(11), p.863.